<fieldset>
    <legend>条件搜索</legend>
    <form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">物资编号</label>
            <div class="layui-input-inline">
                <input name="material_code" value="{:input('material_code')}" placeholder="请输入物资编号" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">物资名称</label>
            <div class="layui-input-inline">
                <input name="material_name" value="{:input('material_name')}" placeholder="请输入物资名称" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">物资型号</label>
            <div class="layui-input-inline">
                <input name="material_model" value="{:input('material_model')}" placeholder="请输入物资型号" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">领用时间</label>
            <label class="layui-input-inline">
                <input class="layui-input" data-date-range name="plan_time" placeholder="请选择领用时间" value="{$get.plan_time|default=''}">
            </label>
        </div>
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">领用人</label>
            <div class="layui-input-inline">
                <input name="admin_name" value="{:input('admin_name')}" placeholder="请输入领用人" class="layui-input">
            </div>
        </div>
         <div class="layui-form-item layui-inline">
            <button class="layui-btn layui-btn-primary" type="submit"><i class="layui-icon">&#xe615;</i> 搜 索</button>
            <button class="layui-btn layui-btn-primary" data-form-export="{:url('index')}?type={$type|default=''}" type="button">
                <i class="layui-icon layui-icon-export"></i> 导 出
            </button>
        </div>
    </form>
    <script>
    window.form.render();
    require(['excel'], function (excel) {
        excel.bind(function (data) {
            var items = [];
            items.push(['规格编号', '规格名称', '规格型号', '单位', '单价', '数量', '小计', '所属人', '领用时间']);
            data.forEach(function (data) {
                items.push([
                    data.material_code || '--',
                    data.material_name || '--',
                    data.material_model || '--',
                    data.material_unit || '--',
                    data.material_price || '0.00',
                    data.material_num || '0',
                    data.material_xjprice || '0.00',
                    data.admin_name || '--',
                    data.create_at,
                ]);
            });
            return items;
        }, '领用报表单');
    });
</script>
</fieldset>